﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using ThirdPartyNinjas.XnaUtility;

namespace ElementumForever.Factory
{
    class XmlTexture
    {
        public XmlTexture(string source)
        {
            this.SourcePath = source;
            Texture2D = ContentFactory.LoadTexture2D(source);
            TextureAtlas = ContentFactory.LoadTextureAtlas(source + "XML");
        }

        public string SourcePath { get; private set; }

        public Texture2D Texture2D { get; private set; }

        public TextureAtlas TextureAtlas { get; private set; }

        public TextureRegion GetRegion(string id)
        {
            return TextureAtlas.GetRegion(id);
        }

    }
}
